From 5ffd69822ce8b645787b268f7c923f3086c47c25 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 5 Nov 2003 10:48:47 +0000 Subject: [PATCH] bitkeeper revision 1.559 (3fa8d58fJMWFHK02Nc3nDhxvCmwvXA) Many files: Cleanups -- Xen now doesn't need to know about the start_info structure for anything except DOM0 boot. --- extras/mini-os/h/hypervisor.h | 4 +- extras/mini-os/head.S | 4 +- extras/mini-os/kernel.c | 4 +- tools/internal/xi_build.c | 6 +-- xen/common/dom0_ops.c | 2 - xen/common/domain.c | 52 ++----------------- xen/drivers/block/xen_block.c | 5 ++ xen/include/asm-i386/processor.h | 3 +- xen/include/hypervisor-ifs/dom0_ops.h | 1 - xen/include/hypervisor-ifs/hypervisor-if.h | 13 ++--- xen/include/hypervisor-ifs/network.h | 12 +++++ xen/include/hypervisor-ifs/vbd.h | 12 +++-- xen/net/dev.c | 21 ++++++-- .../arch/xeno/drivers/block/xl_block.c | 5 +- .../arch/xeno/drivers/network/network.c | 47 ++++++++++++++--- .../arch/xeno/kernel/head.S | 4 +- .../include/asm-xeno/hypervisor.h | 4 +- 17 files changed, 103 insertions(+), 96 deletions(-) diff --git a/extras/mini-os/h/hypervisor.h b/extras/mini-os/h/hypervisor.h index 3afd245fd6..e07018a937 100644 --- a/extras/mini-os/h/hypervisor.h +++ b/extras/mini-os/h/hypervisor.h @@ -103,13 +103,13 @@ static inline int HYPERVISOR_set_callbacks( return ret; } -static inline int HYPERVISOR_net_io_op(unsigned int op, unsigned int idx) +static inline int HYPERVISOR_net_io_op(netop_t *op) { int ret; __asm__ __volatile__ ( TRAP_INSTR : "=a" (ret) : "0" (__HYPERVISOR_net_io_op), - "b" (op), "c" (idx) ); + "b" (op) ); return ret; } diff --git a/extras/mini-os/head.S b/extras/mini-os/head.S index 4a2ccbbe1e..5844e296c4 100644 --- a/extras/mini-os/head.S +++ b/extras/mini-os/head.S @@ -1,8 +1,8 @@ #include /* Offsets in start_info structure */ -#define MOD_START 4 -#define MOD_LEN 8 +#define MOD_START 20 +#define MOD_LEN 24 .globl _start, shared_info diff --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c index 0ead3f18d3..d7a6841cd1 100644 --- a/extras/mini-os/kernel.c +++ b/extras/mini-os/kernel.c @@ -79,8 +79,6 @@ static shared_info_t *map_shared_info(unsigned long pa) */ void start_kernel(start_info_t *si) { - int i; - /* Copy the start_info struct to a globally-accessible area. */ memcpy(&start_info, si, sizeof(*si)); @@ -105,11 +103,13 @@ void start_kernel(start_info_t *si) printk(" pt_base: %p", (void *)si->pt_base); printk(" mod_start: 0x%lx\n", si->mod_start); printk(" mod_len: %lu\n", si->mod_len); +#if 0 /* XXX Change to use NETOP_GET_VIF_INFO and BLOCK_IO_OP_RING_ADDRESS */ printk(" net_rings: "); for (i = 0; i < MAX_DOMAIN_VIFS; i++) { printk(" %lx", si->net_rings[i]); }; printk("\n"); printk(" blk_ring: 0x%lx\n", si->blk_ring); +#endif printk(" dom_id: %d\n", si->dom_id); printk(" flags: 0x%lx\n", si->flags); printk(" cmd_line: %s\n", si->cmd_line ? (const char *)si->cmd_line : "NULL"); diff --git a/tools/internal/xi_build.c b/tools/internal/xi_build.c index 953a8205eb..d972660e87 100644 --- a/tools/internal/xi_build.c +++ b/tools/internal/xi_build.c @@ -10,7 +10,6 @@ #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER) static unsigned long virt_startinfo_addr; -static unsigned long startinfo_frame; static char *argv0 = "internal_domain_build"; @@ -318,9 +317,8 @@ static int setup_guestos( virt_startinfo_addr = virt_load_addr + ((alloc_index-1) << PAGE_SHIFT); - startinfo_frame = page_array[alloc_index-1]; - start_info = map_pfn(startinfo_frame); + start_info = map_pfn(page_array[alloc_index-1]); memset(start_info, 0, sizeof(*start_info)); start_info->pt_base = virt_load_addr + ((tot_pages-1) << PAGE_SHIFT); start_info->mod_start = initrd_addr; @@ -511,8 +509,6 @@ int main(int argc, char **argv) ctxt->failsafe_callback_cs = FLAT_RING1_CS; ctxt->failsafe_callback_eip = 0; - ctxt->start_info_frame = startinfo_frame; - launch_op.u.builddomain.domain = domain_id; launch_op.u.builddomain.num_vifs = atoi(argv[3]); diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 9d820126e3..aad13c5626 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -321,8 +321,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) p->failsafe_selector; op.u.getdomaininfo.ctxt.failsafe_callback_eip = p->failsafe_address; - op.u.getdomaininfo.ctxt.start_info_frame = - p->thread.start_info_frame; } } read_unlock_irqrestore(&tasklist_lock, flags); diff --git a/xen/common/domain.c b/xen/common/domain.c index b8b015f8c4..5ffff5ac19 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -325,11 +325,7 @@ void release_task(struct task_struct *p) */ int final_setup_guestos(struct task_struct *p, dom0_builddomain_t *builddomain) { - start_info_t *startinfo; unsigned long phys_l2tab; - net_ring_t *shared_rings; - net_vif_t *net_vif; - int i; if ( (p->flags & PF_CONSTRUCTED) ) return -EINVAL; @@ -365,7 +361,6 @@ int final_setup_guestos(struct task_struct *p, dom0_builddomain_t *builddomain) p->event_address = builddomain->ctxt.event_callback_eip; p->failsafe_selector = builddomain->ctxt.failsafe_callback_cs; p->failsafe_address = builddomain->ctxt.failsafe_callback_eip; - p->thread.start_info_frame = builddomain->ctxt.start_info_frame; /* NB. Page base must already be pinned! */ phys_l2tab = builddomain->ctxt.pt_base; @@ -376,30 +371,9 @@ int final_setup_guestos(struct task_struct *p, dom0_builddomain_t *builddomain) /* Set up the shared info structure. */ update_dom_time(p->shared_info); - startinfo = (start_info_t *) - map_domain_mem(p->thread.start_info_frame << PAGE_SHIFT); - /* Add virtual network interfaces and point to them in startinfo. */ while ( builddomain->num_vifs-- > 0 ) - { - net_vif = create_net_vif(p->domain); - shared_rings = net_vif->shared_rings; - if (!shared_rings) panic("no network ring!\n"); - } - - for ( i = 0; i < MAX_DOMAIN_VIFS; i++ ) - { - if ( p->net_vif_list[i] == NULL ) continue; - startinfo->net_rings[i] = - virt_to_phys(p->net_vif_list[i]->shared_rings); - memcpy(startinfo->net_vmac[i], - p->net_vif_list[i]->vmac, ETH_ALEN); - } - - /* Add block io interface */ - startinfo->blk_ring = virt_to_phys(p->blk_ring_base); - - unmap_domain_mem(startinfo); + (void)create_net_vif(p->domain); p->flags |= PF_CONSTRUCTED; @@ -438,8 +412,6 @@ int setup_guestos(struct task_struct *p, dom0_createdomain_t *params, l2_pgentry_t *l2tab, *l2start; l1_pgentry_t *l1tab = NULL, *l1start = NULL; struct pfn_info *page = NULL; - net_ring_t *shared_rings; - net_vif_t *net_vif; /* Sanity! */ if ( p->domain != 0 ) BUG(); @@ -581,9 +553,6 @@ int setup_guestos(struct task_struct *p, dom0_createdomain_t *params, update_dom_time(p->shared_info); p->shared_info->domain_time = 0; - /* DOM0 can't be stopped/started, so no need for an ongoing s.i. frame. */ - p->thread.start_info_frame = 0; - virt_startinfo_address = (start_info_t *) (virt_load_address + ((alloc_index - 1) << PAGE_SHIFT)); virt_stack_address = (unsigned long)virt_startinfo_address; @@ -636,23 +605,8 @@ int setup_guestos(struct task_struct *p, dom0_createdomain_t *params, } /* Add virtual network interfaces and point to them in startinfo. */ - while (num_vifs-- > 0) { - net_vif = create_net_vif(dom); - shared_rings = net_vif->shared_rings; - if (!shared_rings) panic("no network ring!\n"); - } - - for ( i = 0; i < MAX_DOMAIN_VIFS; i++ ) - { - if ( p->net_vif_list[i] == NULL ) continue; - virt_startinfo_address->net_rings[i] = - virt_to_phys(p->net_vif_list[i]->shared_rings); - memcpy(virt_startinfo_address->net_vmac[i], - p->net_vif_list[i]->vmac, ETH_ALEN); - } - - /* Add block io interface */ - virt_startinfo_address->blk_ring = virt_to_phys(p->blk_ring_base); + while ( num_vifs-- > 0 ) + (void)create_net_vif(dom); dst = virt_startinfo_address->cmd_line; if ( cmdline != NULL ) diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index c96c7f5326..fb86223735 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -281,6 +281,11 @@ long do_block_io_op(block_io_op_t *u_block_io_op) } break; + case BLOCK_IO_OP_RING_ADDRESS: + op.u.ring_mfn = virt_to_phys(p->blk_ring_base) >> PAGE_SHIFT; + ret = copy_to_user(u_block_io_op, &op, sizeof(op)) ? -EFAULT : 0; + break; + default: ret = -ENOSYS; } diff --git a/xen/include/asm-i386/processor.h b/xen/include/asm-i386/processor.h index 6d05a61c75..d03a96862a 100644 --- a/xen/include/asm-i386/processor.h +++ b/xen/include/asm-i386/processor.h @@ -354,7 +354,6 @@ struct tss_struct { }; struct thread_struct { - unsigned long start_info_frame; /* Filled in on DOM0_START */ unsigned long esp1, ss1; /* Hardware debugging registers */ unsigned long debugreg[8]; /* %%db0-7 debug registers */ @@ -386,7 +385,7 @@ extern struct desc_struct *idt_tables[]; long set_fast_trap(struct task_struct *p, int idx); #define INIT_THREAD { \ - 0, 0, 0, \ + 0, 0, \ { [0 ... 7] = 0 }, /* debugging registers */ \ { { 0, }, }, /* 387 state */ \ 0x20, { 0, 0 }, /* DEFAULT_FAST_TRAP */ \ diff --git a/xen/include/hypervisor-ifs/dom0_ops.h b/xen/include/hypervisor-ifs/dom0_ops.h index cff8bca48c..7c0624b1d2 100644 --- a/xen/include/hypervisor-ifs/dom0_ops.h +++ b/xen/include/hypervisor-ifs/dom0_ops.h @@ -41,7 +41,6 @@ typedef struct full_execution_context_st unsigned long event_callback_eip; unsigned long failsafe_callback_cs; /* CS:EIP of failsafe callback */ unsigned long failsafe_callback_eip; - unsigned long start_info_frame; /* Page frame containing s.i. */ } full_execution_context_t; #define MAX_CMD_LEN 256 diff --git a/xen/include/hypervisor-ifs/hypervisor-if.h b/xen/include/hypervisor-ifs/hypervisor-if.h index 38bac4ca05..5bc9bf6b11 100644 --- a/xen/include/hypervisor-ifs/hypervisor-if.h +++ b/xen/include/hypervisor-ifs/hypervisor-if.h @@ -286,18 +286,15 @@ typedef struct shared_info_st { * NB. We expect that this struct is smaller than a page. */ typedef struct start_info_st { - /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ - unsigned long pt_base; /* VIRTUAL address of page directory. */ - unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */ - unsigned long mod_len; /* Size (bytes) of pre-loaded module. */ /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ unsigned long nr_pages; /* total pages allocated to this domain. */ unsigned long shared_info; /* MACHINE address of shared info struct.*/ - unsigned int dom_id; /* Domain identifier. */ + unsigned long dom_id; /* Domain identifier. */ unsigned long flags; /* SIF_xxx flags. */ - unsigned long net_rings[MAX_DOMAIN_VIFS]; /* MACHINE address of ring.*/ - unsigned char net_vmac[MAX_DOMAIN_VIFS][6]; /* MAC address of VIF. */ - unsigned long blk_ring; /* MACHINE address of blkdev ring. */ + /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ + unsigned long pt_base; /* VIRTUAL address of page directory. */ + unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */ + unsigned long mod_len; /* Size (bytes) of pre-loaded module. */ unsigned char cmd_line[1]; /* Variable-length options. */ } start_info_t; diff --git a/xen/include/hypervisor-ifs/network.h b/xen/include/hypervisor-ifs/network.h index d328fa0118..b106c736b5 100644 --- a/xen/include/hypervisor-ifs/network.h +++ b/xen/include/hypervisor-ifs/network.h @@ -19,6 +19,18 @@ #define NETOP_PUSH_BUFFERS 0 /* Notify Xen of new buffers on the rings. */ #define NETOP_FLUSH_BUFFERS 1 /* Flush all pending request buffers. */ #define NETOP_RESET_RINGS 2 /* Reset ring indexes on a quiescent vif. */ +#define NETOP_GET_VIF_INFO 3 /* Query information for this vif. */ +typedef struct netop_st { + unsigned int cmd; /* NETOP_xxx */ + unsigned int vif; /* VIF index */ + union { + struct { + unsigned long ring_mfn; /* Page frame containing net_ring_t. */ + unsigned char vmac[6]; /* Virtual Ethernet MAC address. */ + } get_vif_info; + } u; +} netop_t; + typedef struct tx_req_entry_st { diff --git a/xen/include/hypervisor-ifs/vbd.h b/xen/include/hypervisor-ifs/vbd.h index 8cbd059d0b..eb4949d5d2 100644 --- a/xen/include/hypervisor-ifs/vbd.h +++ b/xen/include/hypervisor-ifs/vbd.h @@ -78,9 +78,10 @@ typedef struct xen_vbd_info /* Block I/O trap operations and associated structures. */ -#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ -#define BLOCK_IO_OP_ATTACH_VBD 1 /* attach a VBD to a given domain */ -#define BLOCK_IO_OP_RESET 2 /* reset ring indexes on quiescent i/f */ +#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ +#define BLOCK_IO_OP_ATTACH_VBD 1 /* attach a VBD to a given domain */ +#define BLOCK_IO_OP_RESET 2 /* reset ring indexes on quiescent i/f */ +#define BLOCK_IO_OP_RING_ADDRESS 3 /* returns machine address of I/O ring */ typedef struct _extent { u16 raw_device; @@ -103,9 +104,10 @@ typedef struct block_io_op_st unsigned long cmd; union { - /* no entry for BLOCK_IO_OP_SIGNAL */ + /* no entry for BLOCK_IO_OP_SIGNAL */ vbd_attach_t attach_info; - /* no entry for BLOCK_IO_OP_RESET */ + /* no entry for BLOCK_IO_OP_RESET */ + unsigned long ring_mfn; } u; } block_io_op_t; diff --git a/xen/net/dev.c b/xen/net/dev.c index 2250915222..81b50cf4c1 100644 --- a/xen/net/dev.c +++ b/xen/net/dev.c @@ -27,11 +27,10 @@ #include #include #include - #include #include #include - +#include #include #define BUG_TRAP ASSERT @@ -2209,17 +2208,22 @@ long flush_bufs_for_vif(net_vif_t *vif) * Called from guest OS to notify updates to its transmit and/or receive * descriptor rings. */ -long do_net_io_op(unsigned int op, unsigned int idx) +long do_net_io_op(netop_t *uop) { + netop_t op; net_vif_t *vif; long ret; perfc_incr(net_hypercalls); - if ( (vif = current->net_vif_list[idx]) == NULL ) + if ( copy_from_user(&op, uop, sizeof(op)) ) + return -EFAULT; + + if ( (op.vif >= MAX_DOMAIN_VIFS) || + ((vif = current->net_vif_list[op.vif]) == NULL) ) return -EINVAL; - switch ( op ) + switch ( op.cmd ) { case NETOP_PUSH_BUFFERS: ret = get_bufs_from_vif(vif); @@ -2247,6 +2251,13 @@ long do_net_io_op(unsigned int op, unsigned int idx) spin_unlock_irq(&vif->tx_lock); break; + case NETOP_GET_VIF_INFO: + op.u.get_vif_info.ring_mfn = + virt_to_phys(vif->shared_rings) >> PAGE_SHIFT; + memcpy(op.u.get_vif_info.vmac, vif->vmac, ETH_ALEN); + ret = copy_to_user(uop, &op, sizeof(op)) ? -EFAULT: 0; + break; + default: ret = -EINVAL; break; diff --git a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c index 56dab7e3f3..1471ddded5 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c @@ -599,7 +599,10 @@ static void reset_xlblk_interface(void) if ( HYPERVISOR_block_io_op(&op) != 0 ) printk(KERN_ALERT "Possible blkdev trouble: couldn't reset ring\n"); - set_fixmap(FIX_BLKRING_BASE, start_info.blk_ring); + op.cmd = BLOCK_IO_OP_RING_ADDRESS; + (void)HYPERVISOR_block_io_op(&op); + + set_fixmap(FIX_BLKRING_BASE, op.u.ring_mfn << PAGE_SHIFT); blk_ring = (blk_ring_t *)fix_to_virt(FIX_BLKRING_BASE); blk_ring->req_prod = blk_ring->resp_prod = resp_cons = req_prod = 0; diff --git a/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c b/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c index 913acc7ab6..d0fd98f056 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c @@ -118,13 +118,29 @@ static void dbg_network_int(int irq, void *unused, struct pt_regs *ptregs) static int network_open(struct net_device *dev) { struct net_private *np = dev->priv; - int i; + netop_t netop; + int i, ret; - if ( HYPERVISOR_net_io_op(NETOP_RESET_RINGS, np->idx) != 0 ) + netop.cmd = NETOP_RESET_RINGS; + netop.vif = np->idx; + if ( (ret = HYPERVISOR_net_io_op(&netop)) != 0 ) + { printk(KERN_ALERT "Possible net trouble: couldn't reset ring idxs\n"); + return ret; + } + + netop.cmd = NETOP_GET_VIF_INFO; + netop.vif = np->idx; + if ( (ret = HYPERVISOR_net_io_op(&netop)) != 0 ) + { + printk(KERN_ALERT "Couldn't get info for vif %d\n", np->idx); + return ret; + } + + memcpy(dev->dev_addr, netop.u.get_vif_info.vmac, ETH_ALEN); set_fixmap(FIX_NETRING0_BASE + np->net_ring_fixmap_idx, - start_info.net_rings[np->idx]); + netop.u.get_vif_info.ring_mfn << PAGE_SHIFT); np->net_ring = (net_ring_t *)fix_to_virt( FIX_NETRING0_BASE + np->net_ring_fixmap_idx); np->net_idx = &HYPERVISOR_shared_info->net_idx[np->idx]; @@ -209,6 +225,7 @@ static void network_alloc_rx_buffers(struct net_device *dev) struct net_private *np = dev->priv; struct sk_buff *skb; unsigned int end = RX_RING_ADD(np->rx_resp_cons, RX_MAX_ENTRIES); + netop_t netop; if ( ((i = np->net_idx->rx_req_prod) == end) || (np->state != STATE_ACTIVE) ) @@ -245,7 +262,9 @@ static void network_alloc_rx_buffers(struct net_device *dev) /* Batch Xen notifications. */ if ( np->rx_bufs_to_notify > (RX_MAX_ENTRIES/4) ) { - HYPERVISOR_net_io_op(NETOP_PUSH_BUFFERS, np->idx); + netop.cmd = NETOP_PUSH_BUFFERS; + netop.vif = np->idx; + (void)HYPERVISOR_net_io_op(&netop); np->rx_bufs_to_notify = 0; } } @@ -255,6 +274,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned int i, id; struct net_private *np = (struct net_private *)dev->priv; + netop_t netop; if ( np->tx_full ) { @@ -303,7 +323,11 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Only notify Xen if there are no outstanding responses. */ mb(); if ( np->net_idx->tx_resp_prod == i ) - HYPERVISOR_net_io_op(NETOP_PUSH_BUFFERS, np->idx); + { + netop.cmd = NETOP_PUSH_BUFFERS; + netop.vif = np->idx; + (void)HYPERVISOR_net_io_op(&netop); + } return 0; } @@ -391,13 +415,16 @@ static void network_interrupt(int irq, void *unused, struct pt_regs *ptregs) int network_close(struct net_device *dev) { struct net_private *np = dev->priv; + netop_t netop; np->state = STATE_SUSPENDED; wmb(); netif_stop_queue(np->dev); - HYPERVISOR_net_io_op(NETOP_FLUSH_BUFFERS, np->idx); + netop.cmd = NETOP_FLUSH_BUFFERS; + netop.vif = np->idx; + (void)HYPERVISOR_net_io_op(&netop); while ( (np->rx_resp_cons != np->net_idx->rx_req_prod) || (np->tx_resp_cons != np->net_idx->tx_req_prod) ) @@ -498,6 +525,7 @@ int __init init_module(void) int i, fixmap_idx=-1, err; struct net_device *dev; struct net_private *np; + netop_t netop; INIT_LIST_HEAD(&dev_list); @@ -523,7 +551,10 @@ int __init init_module(void) for ( i = 0; i < MAX_DOMAIN_VIFS; i++ ) { - if ( start_info.net_rings[i] == 0 ) + /* If the VIF is invalid then the query hypercall will fail. */ + netop.cmd = NETOP_GET_VIF_INFO; + netop.vif = i; + if ( HYPERVISOR_net_io_op(&netop) != 0 ) continue; /* We actually only support up to 4 vifs right now. */ @@ -548,7 +579,7 @@ int __init init_module(void) dev->stop = network_close; dev->get_stats = network_get_stats; - memcpy(dev->dev_addr, start_info.net_vmac[i], ETH_ALEN); + memcpy(dev->dev_addr, netop.u.get_vif_info.vmac, ETH_ALEN); if ( (err = register_netdev(dev)) != 0 ) { diff --git a/xenolinux-2.4.22-sparse/arch/xeno/kernel/head.S b/xenolinux-2.4.22-sparse/arch/xeno/kernel/head.S index 11a1324c74..d9934d1f5b 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/kernel/head.S +++ b/xenolinux-2.4.22-sparse/arch/xeno/kernel/head.S @@ -9,8 +9,8 @@ #include /* Offsets in start_info structure */ -#define MOD_START 4 -#define MOD_LEN 8 +#define MOD_START 20 +#define MOD_LEN 24 startup_32: cld diff --git a/xenolinux-2.4.22-sparse/include/asm-xeno/hypervisor.h b/xenolinux-2.4.22-sparse/include/asm-xeno/hypervisor.h index 209f3547ec..785616e3fb 100644 --- a/xenolinux-2.4.22-sparse/include/asm-xeno/hypervisor.h +++ b/xenolinux-2.4.22-sparse/include/asm-xeno/hypervisor.h @@ -220,13 +220,13 @@ static inline int HYPERVISOR_set_callbacks( return ret; } -static inline int HYPERVISOR_net_io_op(unsigned int op, unsigned int idx) +static inline int HYPERVISOR_net_io_op(netop_t *op) { int ret; __asm__ __volatile__ ( TRAP_INSTR : "=a" (ret) : "0" (__HYPERVISOR_net_io_op), - "b" (op), "c" (idx) ); + "b" (op) ); return ret; } -- 2.30.2